﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 类的继承与多态;

namespace 类的继承与多态
{
    class action : Icart
    {
        private ArrayList products = new ArrayList();
        public bool Add(product p)
        {
            products.Add(p);
            return true;

        }
        public void Buy(product p)
        {
            Console.WriteLine("购买",p.Name);
            Add(p);
        }
        public void show()
        {
            foreach (product p in products)
            {
                p.show();
                p.showdetil();
            }
        }
        public object find(int dex)
        {
            throw new NotImplementedException();
        }

        public bool remove(int dex)
        {
            throw new NotImplementedException();
        }

       

        public bool updata(int dex)
        {
            throw new NotImplementedException();
        }
    }
}
